<?php

define('APP_PATH', 'F:/phpStudy/PHPTutorial/WWW/ThinkPHPRPC/application'); //框架目录
define('RPC_RUN', true);

class Test {

    /**
     * $action='/index/index/mydata'
     * 要访问的控制器和方法
     */
    public static function get_data($action) {
        $_REQUEST['argv_rpc'] = $action;//index/index/index
        $path = 'F:/phpStudy/PHPTutorial/WWW/ThinkPHPRPC/thinkphp/base.php'; //base文件所在路径
        require_once $path;
        $app = new \think\App();
        $data = $app->run();
        return $data;
    }

}
